package com.tyqx.hashchainbiz.service.impl;

import com.tyqx.hashchainbean.module.*;
import com.tyqx.hashchainbiz.service.QueryDonateService;
import com.tyqx.hashchaindao.mapper.*;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;
import java.util.List;

@Service("queryDonateService")
public class QueryDonateServiceImpl implements QueryDonateService {


    @Resource
    private ProductInMapper productInMapper;

    @Resource
    private DonateCashMapper donateCashMapper;

    @Resource
    private DonateProductMapper donateProductMapper;

    @Resource
    private NeedProductMapper needProductMapper;


    @Resource
    private ProducePlanMapper producePlanMapper;

    @Resource
    private ProduceProductInMapper produceProductInMapper;

    @Resource
    private ProduceProductOutMapper produceProductOutMapper;

    @Resource
    private ProductOutMapper productOutMapper;

    @Resource
    private ShippingInfoMapper shippingInfoMapper;

    @Resource
    private TrackUserMapper trackUserMapper;

    @Resource
    private UseProductMapper useProductMapper;

    @Resource
    private UsersMapper usersMapper;

    @Resource
    private BuyProductMapper buyProductMapper;


    public List<DonateProduct> getDonateProductById(String donateId, String userName) {
        return donateProductMapper.getDonateProductById(donateId);
    }


    public List<DonateProduct> getDonateProductByTime(Date startTime, Date endTime, String userName) {
        return donateProductMapper.getDonateProductByTime(startTime, endTime, userName);
    }


    public List<DonateCash> getDonateCashById(String donateId, String userName) {
        return donateCashMapper.getDonateCashById(donateId);
    }


    public List<DonateCash> getDonateCashByTime(Date startTime, Date endTime, String userName) {
        List<DonateCash> donateCashes=donateCashMapper.getDonateCashByTime(startTime,endTime,userName);
        return donateCashes;
    }


    public List<ProductIn> getProductInById(String donateId, String userName) {
        return productInMapper.getProductInById(donateId);
    }


    public List<ProductIn> getProductInByTime(Date startTime, Date endTime, String userName) {
        return productInMapper.getProductInByTime(startTime, endTime, userName);
    }


    public List<ProductOut> getProductOutById(String donateId, String userName) {
        return productOutMapper.getProductOutById(donateId);
    }


    public List<ProductOut> getProductOutByTime(Date startTime, Date endTime, String userName) {
        return productOutMapper.getProductOutByTime(startTime, endTime, userName);
    }


    public List<UseProduct> getUseProductById(String donateId, String userName) {
        return useProductMapper.getUseProductById(donateId);
    }


    public List<UseProduct> getUseProductByTime(Date startTime, Date endTime, String userName) {
        return useProductMapper.getUseProductByTime(startTime, endTime, userName);
    }


    public List<NeedProduct> getNeedProductById(String donateId, String userName) {
        return needProductMapper.getNeedProductById(donateId);
    }


    public List<NeedProduct> getNeedProductByTime(Date startTime, Date endTime, String userName) {
        return needProductMapper.getNeedProductByTime(startTime, endTime, userName);
    }


    public List<BuyProduct> getBuyProductById(String donateId, String userName) {
        return buyProductMapper.getBuyProductById(donateId);
    }


    public List<BuyProduct> getBuyProductByTime(Date startTime, Date endTime, String userName) {
        return buyProductMapper.getBuyProductByTime(startTime, endTime, userName);
    }


    public List<ProducePlan> getProducePlanById(String donateId, String userName) {
        return producePlanMapper.getProducePlanById(donateId);
    }


    public List<ProducePlan> getProducePlanByTime(Date startTime, Date endTime, String userName) {
        return producePlanMapper.getProducePlanByTime(startTime, endTime, userName);
    }


    public List<ProduceProductIn> getProduceProductInById(String donateId, String userName) {
        return produceProductInMapper.getProduceProductInById(donateId);
    }


    public List<ProduceProductIn> getProduceProductInByTime(Date startTime, Date endTime, String userName) {
        return produceProductInMapper.getProduceProductInByTime(startTime, endTime, userName);
    }


    public List<ProduceProductOut> getProduceProductOutById(String donateId, String userName) {
        return produceProductOutMapper.getProduceProductOutById(donateId);
    }


    public List<ProduceProductOut> getProduceProductOutByTime(Date startTime, Date endTime, String userName) {
        return produceProductOutMapper.getProduceProductOutByTime(startTime, endTime, userName);
    }


    public List<ShippingInfo> getShippingProductById(String donateId, String userName) {
        return shippingInfoMapper.getShippingProductById(donateId);
    }


    public List<ShippingInfo> getShippingProductByTime(Date startTime, Date endTime, String userName) {
        return shippingInfoMapper.getShippingProductByTime(startTime, endTime, userName);
    }
}
